package com.wnxy.sddfp.access;

import com.alibaba.fastjson.JSON;
import com.wnxy.sddfp.access.entity.BankRespDto;
import com.wnxy.sddfp.common.model.BaseResult;

/**
 * @author yellow Docter
 * @date 2024 -04-24
 * @desc
 */
public class AppTest {

    public static void main(String[] args) {

        String str = "{\"respData\":{\"respCode\":\"00000\",\"respMsg\":\"成功\",\"status\":1,\"requestNo\":\"REQ_208f14ff-b\"}}";

        //解析外层
        // {"respData":{"respCode":"00000","respMsg":"成功","status":1,"requestNo":"REQ_208f14ff-b"}}
        BankRespDto bankRespDto = JSON.parseObject(str, BankRespDto.class);
        System.out.println("bankRespDto = " + bankRespDto);
        String respData = bankRespDto.getRespData();
        System.out.println("respData = " + respData);

        BaseResult baseResult = JSON.parseObject(respData, BaseResult.class);
        System.out.println("baseResult = " + baseResult);

    }


}
